import { Table, Button, message } from 'antd';
import { FC, useState, useEffect, useRef } from 'react';

export const PlanCodeInfo: FC = () => {
  const [colums] = useState<any>([
    {
      title: '序号',
      dataIndex: 'productItemType',
      key: 'productItemType',
      width: 100,
    },
    {
      title: '计划代码',
      dataIndex: 'productItemName',
      key: 'productItemName',
      width: 100,
    },
    {
      title: '计划名称',
      dataIndex: 'channelCode',
      key: 'channelCode',
      width: 100,
    },
    {
      title: '业务类型',
      dataIndex: 'makeCode',
      key: 'makeCode',
      width: 100,
    },
    {
      title: '业务类型名称',
      dataIndex: 'planCount',
      key: 'planCount',
      width: 120,
    },
    {
      title: '配置人',
      dataIndex: 'planCount',
      key: 'planCount1212',
      width: 100,
    },
    {
      title: '计划状态',
      dataIndex: 'planCount',
      key: 'planCount12',
      width: 100,
    },
    {
      title: '下线人',
      dataIndex: 'planCount',
      key: 'planCount1',
      width: 100,
    },
    {
      title: '下线时间',
      dataIndex: 'planCount',
      key: 'planCount2',
      width: 100,
    },
    {
      title: '操作',
      key: 'Actions',
      width: 60,
      fixed: 'right',
      render: (text: any, record: any) => (
        <a
          onClick={() => {
            message.info('下线');
          }}
        >
          下线
        </a>
      ),
    },
  ]);
  return (
    <>
      <div className="publicH2Box margT20">
        <h2>计划代码信息</h2>
        <div className="item">
          <div>
            <div className="name">计划代码数量:</div>
            <div className="value">asdfasdfasdf</div>
          </div>
        </div>
        <div className="marg020">
          <Table
            size={'small'}
            scroll={{ x: '100%' }}
            dataSource={[{}]}
            columns={colums}
            rowKey={(record: any) => record.channelEndorOrder || Math.random()}
            pagination={false}
          />
        </div>
      </div>
    </>
  );
};
